var faker=require('faker');
const Mock = require('mockjs')
const _ = require('lodash');

module.exports=function(){
    return {
        news1:_.times(100,function(n){
                return {
                    id:n,
                    title:Mock.Random.ctitle(),
                    img:Mock.Random.image('200x100', Mock.Random.color()),
                    des:Mock.Random.cparagraph(1,40),
                    date:Mock.Random.date('yyyy-MM-dd'),
                    star:
                        Mock.mock({
                            "number|1-100":100
                        })
                }

            }),
            news2:_.times(100,function(n){
                return {
                    id:n,
                    title:Mock.Random.ctitle(),
                    img:Mock.Random.image('200x100', Mock.Random.color()),
                    des:Mock.Random.cparagraph(1,40),
                    date:Mock.Random.date('yyyy-MM-dd'),
                    star:
                        Mock.mock({
                            "number|1-100":100
                        })
                }

            }),
            news3:_.times(100,function(n){
                return {
                    id:n,
                    title:Mock.Random.ctitle(),
                    img:Mock.Random.image('200x100', Mock.Random.color()),
                    des:Mock.Random.cparagraph(1,40),
                    date:Mock.Random.date('yyyy-MM-dd'),
                    star:
                        Mock.mock({
                            "number|1-100":100
                        })
                }

            }),
            users:_.times(100,function(n){
                return {
                    id:n,
                    name:Mock.Random.cname(),
                    photo:Mock.Random.image('60x60', Mock.Random.color()),
                    status:Mock.Random.cparagraph(4),
                    date:Mock.Random.date('yyyy-MM-dd'),
                    age:
                        Mock.mock({
                            "number|16-80":80
                        })


                }

            }),
            product:_.times(100,function(n){
                return {
                    id:n,
                    title:Mock.Random.ctitle(),
                    img:Mock.Random.image('200x100', Mock.Random.color()),
                    text:Mock.Random.cparagraph(),
                    sales:Mock.mock({
                        "number|1-1000": 1000
                      }),
                    date:Mock.Random.date('yyyy-MM-dd'),

                    price:
                        Mock.mock({
                            "number|1-100":100
                        })
                }
            }),
            carousel:_.times(5,function(n){
                return {
                    id:n,
                    title:Mock.Random.cname(),
                    img:Mock.Random.image('200x100', Mock.Random.color()),
                    text:Mock.Random.cparagraph(),
                    url:Mock.Random.url()
                }
            })
    }
}